//
//  HYTableViewRow.m
//
//  Created by yan on 2017/5/8.
//  Copyright © 2017年 yan. All rights reserved.
//

#import "HYTableViewRow.h"

@interface HYTableViewRow ()

@end

@implementation HYTableViewRow

+ (HYTableViewRow *)row:(id)model {
    HYTableViewRow *row = [[HYTableViewRow alloc] init];
    row.model = model;
    row.identifier = row.model ? NSStringFromClass([row.model class]) : nil;
    return row;
}

- (void)setHeightBlock:(HYTableViewRowBlock)heightBlock {
    _heightBlock = heightBlock;
    if (!_heightBlock) {
        return;
    }
    self.height = _heightBlock();
}

@end
